Skip to content

Fix/thinking UI app#21549

Open
SOUMITRO-SAHA wants to merge 3 commits intoanomalyco:devfrom
SOUMITRO-SAHA:fix/thinking-ui-app
Open

Fix/thinking UI app#21549
SOUMITRO-SAHA wants to merge 3 commits intoanomalyco:devfrom
SOUMITRO-SAHA:fix/thinking-ui-app

Conversation

@SOUMITRO-SAHA
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #21548

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Implements a collapsible "Thinking" container for model reasoning outputs in the UI.

How did you verify your code works?

  • Ran bun typecheck in packages/opencode - passed
  • Ran linting - passed
  • Manual testing: toggled /thinking command and verified reasoning containers open/close correctly
  • Verified setting persistence across sessions

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Add reasoningToolDefaultOpen setting (default: true) to control
  thinking container state
- Render reasoning parts in collapsible container with brain icon and
  "Thinking" label
- Add /thinking slash command to toggle default open state
- Remove custom thinking UI indicator in favor of tool-part pattern
- Follow existing patterns from shellToolPartsExpanded and
  editToolPartsExpanded
Add translation keys for new thinking functionality across all supported
languages.

- Add command settings translations for thinking enable/disable toggle
  - command.settings.thinking.enable
  - command.settings.thinking.disable
  - command.settings.thinking.description
- Add UI message part translation for thinking state
  - ui.messagePart.thinking

Updated languages: ar, br, bs, da, de, en, es, fr, ja, ko, no, pl, ru,
th, tr, zh, zht
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Hey! Your PR title Fix/thinking UI app doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

The following comment was made by an LLM, it may be inaccurate:

I found potential related PRs:

  1. PR feat(desktop): Make Reasoning Collapsable #15259: "feat(desktop): Make Reasoning Collapsable"

  2. PR feat(ui): Add thinking/reasoning block visibility toggle #9139: "feat(ui): Add thinking/reasoning block visibility toggle"

  3. PR fix(provider): preserve assistant message content when reasoning blocks present #21370: "fix(provider): preserve assistant message content when reasoning blocks present"

The most potentially overlapping is PR #15259 which appears to address the same feature (making reasoning/thinking blocks collapsible). You may want to check if that PR was closed/merged and whether this is a reopened or complementary fix.

@SOUMITRO-SAHA
Copy link
Copy Markdown
Contributor Author

I'm not entirely confident that this PR will be merged. Over time, additional changes may introduce merge conflicts, which could further reduce its chances of being accepted.

As a result, I've decided to maintain my own fork of opencode. This message is for anyone interested in trying out these features—you can visit my fork and refer to the "Notes" section in the README.md for detailed guidance.

The setup process is straightforward and easy to follow.

Fork: https://github.com/SOUMITRO-SAHA/opencode

use opencode on a daily basis and will continue to resolve all issues that I regularly face. Feel free to create new issues in my fork—I'll make sure they're resolved as soon as possible.
You can also bring issues from the original opencode repository to my fork's issue section—I'll surely look into those as well.

Issue Tracker: https://github.com/SOUMITRO-SAHA/opencode/issues

The reasoning part visibility was incorrectly gated by
showReasoningSummaries,
preventing thinking UI from displaying. Now reasoning parts render when
they
have text content, and the `/thinking` command controls expand/collapse
state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Thinking display not working in web UI

1 participant